require 'watir'
include Watir
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
require 'watir/testcase'
require 'watir/contrib/enabled_popup'
class TC_Forums < Test::Unit::TestCase
  def test_28
    $ie.goto($UniVar)
    $ie.refresh()
=begin
    $ie.link(:text, 'Control Panel').click
    $ie.link(:text, 'Administration').click
    $ie.table(:index, 7).click
    $ie.link(:index, 13).click
    $ie.wait()
    $ie.text_field(:index, 1).value = "zwatir forum"
    $ie.text_field(:index, 2).value = "Test to see if watir can create a new forum"
    $ie.link(:text, 'Save').click
    assert($ie.link(:text, 'zwatir forum').exists?)


    $ie.link(:text, 'Forums').click
    $ie.link(:text, 'zwatir forum').click
    $ie.link(:text, 'Write a New Forum').click
    $ie.text_field(:index, 2).value = "Cool Forum Post"
=end

$ie.goto('http://localhost/cs/forums/AddPost.aspx?ForumID=1')
    $ie.image(:title, 'Edit HTML Source').click
    $ie.frame(:index, 4).text_field(:index, 1).set('klasjfd')
  

#    temp_var = "temp body"
#    $ie.ie.Document.parentWindow.execScript("tinyMCE.getInstanceById(tinyMCE.getEditorId('mce_editor_0')).execCommand('mceSetContent', false, '" + temp_var + "')")        


=begin





    
    $ie.link(:text, $ADMIN).click
    $ie.div(:index, 23).click
    #$ie.div(:index, 26).flash
    
    $ie.select_list(:index, 4).select('Plain Text')
    $ie.button(:caption, 'Save Changes').click
#    $ie.button(:caption, 'Save').click
=end
  end
end